<template>
    <div class="school">
        <h4>学校姓名:{{name}}</h4>
        <h4>学校地址:{{addr}}</h4>
        <button @click="sendSchoolName">把学校名给app</button>
    </div>
</template>

<script>

    export default {
        name : 'School',
        data(){
            return {
                name:'浙大abcdef',
                addr:'浙江杭州',
            }
        },
        props:['getSchoolName'],
        methods: {
            sendSchoolName(){
                this.getSchoolName(this.name)
            }
        },
    };
</script>

<style scoped lang="less">
    .school{
        background-color: skyblue;
    }
</style>
